import React, { Component } from "react";
import Taro from '@tarojs/taro';
import { View,Image,Text } from '@tarojs/components';
import { AtTabs, AtTabsPane,AtButton,AtAvatar,AtGrid   } from 'taro-ui';
import Tab from '../../components/tabBar/Tab';
import './mine.scss'
class Mine extends Component {
  constructor () {
    super(...arguments)
    this.state = {
      current: 0,
    }
  }
  gotoziliao(){
    Taro.navigateTo({
		  url: './../../pages/mineziliao/mineziliao'
		})
  }
  gotograde(){
    Taro.navigateTo({
		  url: '../../pages/minegrade/minegrade'
		})
  }
  gotoorder(){
    Taro.navigateTo({
		  url: '../../pages/mineorder/mineorder'
		})
  }
  myaction(item,index){
    switch(index){
      case 0:{
        Taro.navigateTo({
          url: '../../pages/minepingtuan/minepingtuan'
        })
      }
      break;
      case 1:{
        Taro.navigateTo({
          url: '../../pages/minechoujiang/minechoujiang'
        })
      }
      break;
      case 2:{
        Taro.navigateTo({
          url: '../../pages/mineyouhuiquan/mineyouhuiquan'
        })
      }
      break;
      case 3:{
        Taro.navigateTo({
          url: '../../pages/mineshoucang/mineshoucang'
        })
      }
      break;
      case 4:{
        Taro.navigateTo({
          url: '../../pages/minejifen/minejifen'
        })
      }
      break;
      case 5:{
        Taro.navigateTo({
          url: '../../pages/minepinglun/minepinglun'
        })
      }
      break;
      case 6:{
        Taro.navigateTo({
          url: '../../pages/minewenti/minewenti'
        })
      }
      break;
    }
    
    console.log(item,index)
  }
  render () {
    return (
      <View className='mineconent'>
        <View className='minetop'><View className='at-row minetop1'>
        <View className='at-col at-col-2 topat'>
        <AtAvatar circle image='https://jdc.jd.com/img/200'></AtAvatar>
        </View>
  <View className='at-col at-col-6 toptext' style='font-size:16px'>
    <View><Text>不知道先生</Text></View>
    <View onClick={this.gotograde}><Text>升级2级还需要80积分</Text></View>
  </View>
  <View className='at-col at-col-1 at-col__offset-3' onClick={this.gotoziliao}>C</View>
        </View>
        <View className='minetop2'>
        <AtGrid data={
  [
    {
      image: 'https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png',
      value: '可用余额'
    },
    {
      image: 'https://img20.360buyimg.com/jdphoto/s72x72_jfs/t15151/308/1012305375/2300/536ee6ef/5a411466N040a074b.png',
      value: '未使用优惠券'
    },
    {
      image: 'https://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png',
      value: '可用积分'
    }
  ]
} />
        </View>
        </View>
        
        <View className='minemid'>
          <View className='minemid1' style='font-size:18px' onClick={this.gotoorder}>
            <Text className='minemidtext'>我的订单</Text>
            <Text className='minemidtext1'>查看全部订单&gt;</Text>
          </View>
          <View className='minemid2'>
          <AtGrid columnNum={6} hasBorder={false} style='height:30px;width:30px' data={
  [
    {
      image: 'https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png',
      value: '待付款'
    },
    {
      image: 'https://img20.360buyimg.com/jdphoto/s72x72_jfs/t15151/308/1012305375/2300/536ee6ef/5a411466N040a074b.png',
      value: '待成团'
    },
    {
      image: 'https://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png',
      value: '待核销'
    }
    ,
    {
      image: 'https://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png',
      value: '待发货'
    }
    ,
    {
      image: 'https://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png',
      value: '待收货'
    }
    ,
    {
      image: 'https://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png',
      value: '待评价'
    }
  ]
} />
          </View>
        </View>
        <View className='minebottom'>
        <AtGrid onClick={this.myaction.bind(this)} data={
  [
    {
      image: 'https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png',
      value: '我的拼团'
    },
    {
      image: 'https://img20.360buyimg.com/jdphoto/s72x72_jfs/t15151/308/1012305375/2300/536ee6ef/5a411466N040a074b.png',
      value: '我的抽奖'
    },
    {
      image: 'https://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png',
      value: '我的优惠券'
    },
    {
      image: 'https://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png',
      value: '我的收藏'
    },
    {
      image: 'https://img30.360buyimg.com/jdphoto/s72x72_jfs/t5770/97/5184449507/2423/294d5f95/595c3b4dNbc6bc95d.png',
      value: '积分商城'
    },
    {
      image: 'https://img30.360buyimg.com/jdphoto/s72x72_jfs/t5770/97/5184449507/2423/294d5f95/595c3b4dNbc6bc95d.png',
      value: '我的评论'
    },
    {
      image: 'https://img30.360buyimg.com/jdphoto/s72x72_jfs/t5770/97/5184449507/2423/294d5f95/595c3b4dNbc6bc95d.png',
      value: '常见问题'
    }
  ]
} />
        </View>
      <Tab current={3}></Tab>
      </View>
      
    )
  }
}
export default Mine